package code;

import java.util.ArrayList;
import java.util.Iterator;

public class ArrayListtext {

	public static void main(String[] args) {
		ArrayList<Integer> numberList = new  ArrayList<Integer>();
		numberList.add(99);
		numberList.add(18);
		numberList.add(8);
		System.out.println(numberList.get(0));
		for(int i=0; i<numberList.size(); i++ ){
			System.out.println(numberList.get(i));
		}
		for(Integer i : numberList){
			System.out.println(i);
		}
		Iterator<Integer> l = numberList.iterator();
		while(l.hasNext()){
			System.out.println(l.next());
		}
	}

}
